
#include        <stdlib.h>
#include        "bistromathique.h"

int             eval_expr(char *base, char *operateurs, char *expr, int size)
{
  int           i;
  int           j;
  int           oper;
  char		**expr_tab;
  int           (*func[5])(int, int);

  i = 0;
  j = 0;
  expr_tab = my_str_to_wordtab(expr);
  init_dl(tab)
  oper = count_oper(str);
  while (i < oper)
    {
      if (tab[1][0] == '-')
        return ((&sous_inf)(itab));
      else if (tab[1][0] == '+')
        return ((&add_inf)(itab));
      find_op2(tab, itab);
      i++;
    }
}

int             find_op2(char **tab, int *itab)
{
  if (tab[1][0] == '%')
    return ((&modul_inf)(itab));
  else if (tab[1][0] == '*')
    return ((&mult_inf)(itab));
  else if (tab[1][0] == '/')
    return ((&divi_inf)(itab));
}
